package com.itheima.demo02;

import java.io.File;
import java.io.IOException;

public class FileClass04 {
    public static void main(String[] args) {
        File file1 = new File("day11\\aaa");
        file1.mkdirs();
        File file2 = new File("day11\\a.txt");
        try {
            file2.createNewFile();
        } catch (IOException e) {
            e.printStackTrace();
        }
        boolean result1 = file1.isDirectory();
        System.out.println(result1);
        boolean result2 = file2.isFile();
        System.out.println(result2);
        boolean result3 = file2.exists();
        System.out.println(result3);
        String path = file2.getAbsolutePath();
        System.out.println(path);
        String path1 = file1.getPath();
        System.out.println(path1);
        String name = file1.getName();
        System.out.println(name);
    }
}
